home *** CD-ROM | disk | FTP | other *** search
/ InterCD 2000 January / january_2000.iso / Site Building / HoTMetaL Pro / hm6ev.exe / data1.cab / Programming_Samples / Scripts / Source_Layout / macros.txt < prev   
Encoding:
Text File  |  1999-10-15  |  829 b   |  25 lines

  1. <MACRO name="On_Application_Open" lang="JScript"><![CDATA[
  2.   var viewWYSIWYG = 0;
  3.   var viewTagsOn = 1;
  4.   var viewSource = 2;
  5. ]]></MACRO> 
  6.  
  7. <MACRO name="Layout Document" lang="JScript" id="52" desc="Apply source layout to entire document"><![CDATA[
  8.   if (ActiveDocument.ViewType == viewSource) {
  9.      ActiveDocument.Layout();
  10.   }
  11.   else {
  12.     Application.Alert("Applying source layout only works in source view.\nSwitch to source view and try again.");
  13.   }
  14. ]]></MACRO> 
  15.  
  16. <MACRO name="Layout Selection" lang="JScript" id="53" desc="Apply source layout to the current selection"><![CDATA[
  17.   if (ActiveDocument.ViewType == viewSource) {
  18.      Selection.Layout();
  19.   }
  20.   else {
  21.     Application.Alert("Applying source layout only works in source view.\nSwitch to source view and try again.");
  22.   }
  23. ]]></MACRO> 
  24.  
  25.